<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // history.pushState 方法，业务需要对这个方法进行重写，
        // 添加业务逻辑
        let obj = {
            func:function(){
                console.log("123");
            }
        }
        obj.func();
        let originalFunc = obj.func;
        obj.func = function(){
            originalFunc();
            console.log("456");
        }
        obj.func();
    </script>
</body>
</html>